    //添加项目组件
    const addBox = {
        props: [`options`],
        data: function() {
            return {
                //item是用来存储input表单数据的对象,与input双向绑定
                item: {
                    donater: ``,
                    money: ``,
                    date: ``,
                    selected: 1
                },
            }
        },
        components: {
            'selectBox': selectBox,
        },
        template: `<div class="addPart">
    <label><slot name="donater"></slot><input type="text" v-model="item.donater"></label>
    <label><slot name="donated"></slot><select-box :options="options" :value="item.selected" @change="selectChange" :add="0"></select-box>
    </label>
    <label><slot name="donate-money"></slot><input type="number" v-model="item.money"></label>
    <label><slot name="donate-date"></slot><input type="date" v-model="item.date"></label>
    <button id="btnAdd" @click="$emit('addlist',item)"><slot name="btn-add"></slot></button>
</div>`,
        methods: {
            //获取子组件下拉选择框值的方法
            selectChange(value) {
                this.item.selected = +value;
            }
        }
    }